#ifndef COLORPLANE_H
#define COLORPLANE_H

#include <QImage>
#include <QWidget>
#include <QLabel>
#include <QGridLayout>
#include "ScrollArea.h"

enum ComponentYUVID{
	COMPONENT_Y = 0,
	COMPONENT_U,
	COMPONENT_V,
	COMPONENT_COUNT,
		
};
	
enum YUVModelType{
	YUVMODEL_QUANTIZATION = 0,
	YUVMODEL_COUNT,
};

class ColorPlane: public QWidget 
{
public:
	ColorPlane();

private:
	enum ComponentYUVID x_coor;
	enum ComponentYUVID y_coor;
	QImage *image;
	QLabel *label;
	enum YUVModelType yuv_model;
	ScrollArea* scroll_area;
	QGridLayout *layout;
	int choose_value;
	
	int draw_color_plane();
Q_OBJECT
public slots:
	void ChooseValueChanged(int value);
};

#endif // MAINWINDOW_H
